import Request from "@/Request";
// import type { UploadFile } from 'element-plus/es/components/upload/src/upload.type'


//部门信息接口
interface UpdateDepartment_data{
  name: string,
  minister: string,
  ministerNum: string,
  ministerPhone: string,
  ministerEmail: string,
  introduction: string,
  harvest: string,
  link: string,
  
}

//社团信息接口
interface UpdateByAssociation_data{
  id: number,
  name: string,
  associationStudentName: string,
  associationStudentPhone:string,
  associationStudentNumber: string,
  associationRegisterEmail:string,
  teacherName: string,
  teacherPhone: string,
  associationIntroduction: string,
  associationType: string,
  associationActivity: string,
  associationIdea: string,
  departments: Array<string>,
  link: string,
  stallTime: string,
  stallLocation: string,
  interviewNum: number,
  interviewNow:number,
}




class UpdateRequest extends Request{
  //更新部门信息函数
  public UpdateDepartment(data: UpdateDepartment_data) {
    return this.post("/Association/updateByDepartment", data);
  }

  //更新社团信息函数
  public UpdateAssociation(data: UpdateByAssociation_data) {
    return this.post("/Association/updateByAssociation", data);
  }

  //上传照片
  public UpLoad(data:FormData) {
    return this.post("/Association/uploadPhotoWall", data);
  }
 
}

export default new UpdateRequest();